Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Text

Public Class CAction

#Region "Attributes"
    Private _ID_Action As Integer
    Private _ActionName As String
#End Region

#Region "Properties"

    Public Property ID_ACTION() As Integer
        Get
            Return _ID_Action
        End Get
        Set(ByVal value As Integer)
            _ID_Action = value
        End Set
    End Property

    Public Property ACTIONNAME() As String
        Get
            Return _ActionName
        End Get
        Set(ByVal value As String)
            _ActionName = value
        End Set
    End Property
#End Region

End Class

Public Class CActions
    Public Shared Function GetActionList() As ArrayList
        Dim aryItems As New ArrayList
        Dim strSQL As String

        strSQL = "SELECT * FROM tblAction"
        Dim objReader As SqlDataReader = Nothing
        Try
            Dim objItem As CAction
            objReader = BaseDB.ExecSql_DataReader(strSQL)
            While objReader.Read
                objItem = New CAction
                With objItem
                    .ID_ACTION = objReader.GetInt32(0)
                    .ACTIONNAME = objReader.GetString(1)
                End With
                aryItems.Add(objItem)
            End While
        Catch ex As System.Exception
            Throw ex
        Finally
            If Not IsNothing(objReader) Then
                objReader.Close()
            End If
        End Try
        Return aryItems
    End Function
End Class
